package com.valten.controller;

import com.valten.service.OrderService;
import com.valten.service.TranTest2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;
    @Autowired
    private TranTest2Service tranTest2Service;

    @RequestMapping("hello")
    public void hello() throws InterruptedException {
        for (int i = 0; i < 100; i++) {
            tranTest2Service.sendMessage1();
        }
    }

    @RequestMapping("test")
    public void test() throws InterruptedException {
        orderService.orderTask();
    }
}
